//index.js
//获取应用实例
const app = getApp()

Page({
  data: {
    cureData: []
  },
  onShow() {
    app.$http('/cures').then(response => {
      this.setData({
        cureData: response
      })
    }, error => {})
  },
  setMemberData(e) {
    wx.setStorage({
      key: 'indexCureData',
      data: JSON.stringify(this.data.cureData[e.currentTarget.dataset.index])
    })
    wx.navigateTo({
      url: '../cure/msg'
    })
  }
})
